//扩展Array的indexOf方法
if(!Array.prototype.indexOf){
    Array.prototype.indexOf = function(e, offset){

        offset = offset || 0;
        var length = this.length;

        if (offset < 0) {
            offset += length;
        }

        for( ; offset < length; offset++){
            if(this[offset] == e){
                return offset;
            }
        }
        return -1;
    }
}
//扩展Array的remove方法
if(!Array.prototype.remove){
    Array.prototype.remove = function(from, to) {

        var rest = this.slice((to || from) + 1 || this.length);

        this.length = from < 0 ? this.length + from : from;

        return this.push.apply(this, rest);

    }
}

$(function(){

    // 显示代码区行号
    window.prettyPrint && prettyPrint();

    //page
    $('.page').myPagination({panel:{tipInfo_on:true,tipInfo:'跳{input}/{sumPage}页',tipInfo_css:{width:'25px',height:"20px",border:"1px solid #DDD",padding:"0 0 0 5px",margin:"0 5px 0 5px",color:"#48B9EF"}}});

    //button_dropdown
    $('.u_button_large').powerFloat({target:'.u_button_dropdown_large',width:'inherit'});
    $('.u_button_middle').powerFloat({target:'.u_button_dropdown_middle',width:'inherit'});
    $('.u_button_small').powerFloat({target:'.u_button_dropdown_small',width:'inherit'});

    //table
    $('.u_table tbody tr:nth-child(even) td').addClass("u_table_split");

});


